import axios from 'axios'
import cookie from "js-cookie"

const request = axios.create({
    timeout: 5000
})

request.interceptors.request.use(config => {
    const token = cookie.get('token')
    config.headers.Authoriztion = token
    return config
})

request.interceptors.response.use(config => {
    return config
}, error => {
    return Promise.reject(error)
})

export default request